Intro To Probability

3. Conditional Probability and independence

Example

(Gambler's Ruin)
Two gamblers, A and B, bet on the outcomes of successive flips of a coin. On each flip, if the coin comes up heads, A collects 1 unit from B, whereas if it comes up tails, A pays 1 unit to B. They continue to do this until one of them runs out of money. If its assumed that the successive flips of the coin are independent and each flip results in a head with probability p, what is the probability that A ends up with all the money if he starts with i units and B starts with Ni units?

Let E be the event A ends up with all the money starting with i and B starts with Ni. Let H denote the event a flip lands heads. Then

Pi=P(E)=P(E|H)P(H)+P(E|Hc)P(Hc)=pP(E|H)+(1p)P(E|Hc)=pPi+1+qPi1

where q=1p so we have

pPi+qPi=pPi+1+qPi1Pi+1Pi=qp(PiPi1)i=1,2,...,N1

since P0=0

P2P1=qp(P1P0)=qpP1P3P2=qp(P2P1)=(qp)2P1PiPi1=qp(Pi1Pi2)=(qp)i1P1PNPN1=qp(PN1PN2)=(qp)N1P1PiP1=P1[(qp)+(qp)2++(qp)i1]Pi={1(q/p)i1(q/p)P1if qp1iP1if qp=1

now using the fact that PN=1 we have

P1={1(q/p)1(q/p)Nif p12iNif p=12

so finally

Pi={1(q/p)i1(q/p)Nif p12iNif p=12
Remark

essentially when solving you should immediately recognize the need to solve for a recursive formula(just like you do for computational problems)